lcBlockRasterizeMem Home

Exports view into raster image (in a memory buffer). The image will have Windows BMP format.

 int lcBlockRasterizeMem (
   HANDLE hBlock,
   HANDLE hMem,
   double Xmin,
   double Ymin,
   double Xmax,
   double Ymax,
   int ImgW,
   int ImgH
 );

Parameters
hBlock
  Handle to a block object.
hMem
  Pointer to a memory buffer. If this value is NULL, then LiteCAD will not write to a memory, but, calculates the image size only.
Xmin Ymin
  Left-bottom corner of the exported area.
Xmsx Ymax
  Right-top corner of the exported area.
ImgW ImgH
  Width and height of output image (pixels).
You can specify only one dimension and set zero for other, it will be calculated automatically, depend on the image proportions.

Return Value

  Number of bytes copied to a memory. If the return value is zero - an error occurred during this operation. This can happen if the memory buffer size is too small to contain the image.
If hMem parameter is NULL, then the return value is a number of bytes required to contain the image.

Remarks

  If parameters Lef, Bot, Rig, Top, are zero, then the whole view extents will be exported.
Your application must allocate a memory buffer of sufficient size to store the drawing. To determine the drawing's equivalent buffer size, use this function with the hMem=NULL parameter.

See Also

  Code sample,   lcBlockRasterize,   LC_CMD_RASTERIZE